<template>
    <div>
        <!-- 表格 -->
        <el-table
            :data="list"
            height="600"
            border
            style="width: 100%">
    
            <el-table-column type="index" label="序号" width="150"></el-table-column>
            <el-table-column prop="name" label="签到名字" width="200"></el-table-column>
            <el-table-column prop="user.name" label="负责人" ></el-table-column>
            <el-table-column prop="startTime" label="结束时间" ></el-table-column>
            <el-table-column prop="endTime" label="结束时间" ></el-table-column>

            <el-table-column label="操作" width="200">
                <template slot-scope="scope">
                    <el-button
                    @click="handleSignin(scope.row.id)">进入签到</el-button>
                </template>
             </el-table-column>

        </el-table>

    </div>
</template>

<script>

import personsigninlistApi from '../../api/personsigninlist'

export default {
    data() {
        return {
            list: [],
        }
    },
    components:{
        personsigninlistApi
    },
    created(){
        this.fetchData();
    },

    methods:{  
        fetchData() {
            personsigninlistApi.search().then(res=>{  
                const resp = res.data
                this.list = resp.data
            })
        },
        handleSignin(signinId){   
            console.log(signinId)
        }
        
        
        
    },
    
}
</script>


